home *** CD-ROM | disk | FTP | other *** search
- Subject: v25i016: trn 2.0 - threaded newsreader based on rn 4.4, Part13/13
- Newsgroups: comp.sources.unix
- Approved: vixie@pa.dec.com
-
- Submitted-by: davison@borland.com (Wayne Davison)
- Posting-number: Volume 25, Issue 16
- Archive-name: trn/part13
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of archive 13 (of 13)."
- # Contents: trn.1
- # Wrapped by vixie@cognition.pa.dec.com on Tue Dec 3 16:34:58 1991
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'trn.1' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'trn.1'\"
- else
- echo shar: Extracting \"'trn.1'\" \(83112 characters\)
- sed "s/^X//" >'trn.1' <<'END_OF_FILE'
- X.\" $Id: trn.1,v 4.4.3.1 1991/11/22 04:13:39 davison Trn $
- X.\"
- X.\" This software is Copyright 1991 by Stan Barber.
- X.\"
- X.\" Permission is hereby granted to copy, reproduce, redistribute or otherwise
- X.\" use this software as long as: there is no monetary profit gained
- X.\" specifically from the use or reproduction of this software, it is not
- X.\" sold, rented, traded or otherwise marketed, and this copyright notice is
- X.\" included prominently in any copy made.
- X.\"
- X.\" The author make no claims as to the fitness or correctness of this software
- X.\" for any use whatsoever, and it is provided as is. Any use of this software
- X.\" is at the user's own risk.
- X.\"
- X.de Sh
- X.br
- X.ne 5
- X.PP
- X\fB\\$1\fR
- X.PP
- X..
- X.de Sp
- X.if t .sp .5v
- X.if n .sp
- X..
- X.de Ip
- X.br
- X.ie \\n.$>=3 .ne \\$3
- X.el .ne 3
- X.IP "\\$1" \\$2
- X..
- X.\"
- X.\" Set up \*(-- to give an unbreakable dash;
- X.\"
- X.tr \(bs-|\(bv\*(Tr
- X.ie n \{\
- X.ds -- \(bs-
- X.if (\n(.H=4u)&(1m=24u) .ds -- \(bs\h'-12u'\(bs\h'-12u'-\" diablo 10 pitch
- X.if (\n(.H=4u)&(1m=20u) .ds -- \(bs\h'-12u'\(bs\h'-8u'-\" diablo 12 pitch
- X.ds L" ""
- X.ds R" ""
- X.ds L' '
- X.ds R' '
- X'br\}
- X.el\{\
- X.ds -- \(em\|
- X.tr \*(Tr
- X.ds L" ``
- X.ds R" ''
- X.ds L' `
- X.ds R' '
- X'br\}
- X.TH TRN 1 LOCAL
- X.UC 6
- X.SH NAME
- trn - threaded read news program
- X.SH SYNOPSIS
- X.B trn [options] [newsgroups]
- X.SH DESCRIPTION
- X.I Trn
- is a threaded version of
- X.I rn,
- which is a replacement for the readnews(1) program.
- Being \*(L"threaded\*(R" means that the articles are interconnected
- in reply order.
- XEach discussion thread is a tree of articles, where all the
- reply (child) articles branch off from their respective originating
- X(parent) articles.
- A representation of this tree (or a portion of it) is displayed in the
- article header as you are reading news.
- This gives you a better feel for how all the articles are related, and
- even lets you see at a glance when an article already has a plethora of
- replies (to avoid beating a subject to death).
- In addition,
- X.I trn
- has a thread selector menu that allows you to quickly browse
- the subjects and authors of the available threads and choose the
- ones you find interesting.
- The remaining threads can either be saved for later or marked as read.
- X.PP
- If you are already familiar with
- X.I rn
- you will probably want to skip forward to the section on the
- X.IR "Thread Selection Mode" ,
- then move on to read about the
- X.IR "Tree Display" ,
- and finish with the summary of
- X.IR "What's New" ?
- with
- X.IR trn .
- If you're impatient, just dive in and get started.
- All the regular commands are the same as those in
- X.IR rn ,
- and the on-line help will give you a quick run-down of what new commands are
- available.
- Just type \*(L'h\*(R' from any prompt.
- I'd suggest using the command:
- X.Sp
- X trn \-x \-X
- X.Sp
- to make sure some of the best new features are turned on.
- X.Sh "Starting Trn"
- If no newsgroups are specified, all the newsgroups which have unread news
- are displayed, and then the user is asked for each one whether he wants to
- read it, in the order in which the newsgroups occur in the
- X.I .newsrc
- file.
- With a list of newsgroups,
- X.I trn
- will start up in \*(L"add\*(R" mode, using the list as a set of patterns to
- add new newsgroups and restrict which newsgroups are displayed.
- See the discussion of the \*(L'a\*(R' command on the newsgroup selection
- level.
- X.PP
- X.I Trn
- operates on four levels: the newsgroup selection level, the thread
- selection level, the article selection level, and the paging level.
- XEach level has its own set of commands, and its own help menu.
- At the paging level (the bottom level),
- X.I trn
- behaves much like the
- X.IR more (1)
- program.
- At the thread selection level, you are presented with the subjects and
- X(optionally) authors associated with each discussion thread, and given
- a chance to choose which ones you wish to read now, save for later, or
- manipulate in some way.
- At the article selection level, you may read them in the default order
- X(which follows the discussion of the articles and their replies), or jump
- around from one article to another.
- At the newsgroup selection level (the top level), you may specify which
- newsgroup you want next, or read them in the default order, which is the
- order that the newsgroups occur in your
- X.I .newsrc
- file.
- X(You will therefore want to rearrange your
- X.I .newsrc
- file to put the most interesting newsgroups first.
- This can be done with the \*(L'm\*(R' command on the Newsgroup Selection level.
- WARNING: invoking readnews/vnews (the old user interface) in any way (including
- as a news checker in your login sequence!) will cause your
- X.I .newsrc
- to be disarranged again.)
- X.PP
- On any level, at ANY prompt, help is available in the form of a summary of
- available commands and what they do by typing an \*(L'h\*(R'.
- This is probably the most important command to remember, so don't you
- forget it.
- X.PP
- Typing space to any question means to do the normal thing.
- You will know what that is because
- every prompt has a list of several plausible commands enclosed in
- square brackets.
- The first command in the list is the one which will be done if you type
- a space.
- X(All input is done in cbreak mode, so carriage returns should not be typed
- to terminate anything except certain multi-character commands.
- Those commands will be obvious in the discussion below because they take an
- argument.)
- X.PP
- Upon startup,
- X.I trn
- will do several things:
- X.Ip 1. 4
- It will look for your
- X.I .newsrc
- file, which is your list of subscribed-to
- newsgroups.
- If
- X.I trn
- doesn't find a
- X.IR .newsrc ,
- it will create one.
- If it does find one, it will back it up under the name \*(L".oldnewsrc\*(R".
- X.Ip 2. 4
- It will input your
- X.I .newsrc
- file, listing out the first several newsgroups
- with unread news.
- X.Ip 3. 4
- It will perform certain consistency checks on your
- X.IR .newsrc .
- If your
- X.I .newsrc
- is out of date in any of several ways,
- X.I trn
- will warn you and patch it up for you, but you may have to wait a little
- longer for it to start up.
- X.Ip 4. 4
- X.I Trn
- will next check to see if any new newsgroups have been created, and give
- you the opportunity to add them to your
- X.IR .newsrc .
- X.Ip 5. 4
- X.I Trn
- goes into the top prompt level\*(--the newsgroup selection level.
- X.Sh "Newsgroup Selection Level"
- In this section the words \*(L"next\*(R" and \*(L"previous\*(R" refer to
- the ordering of the newsgroups in your
- X.I .newsrc
- file.
- On the newsgroup selection level, the prompt looks like this:
- X.Sp
- X******** 17 unread articles in talk.blurfl\*(--read now? [ynq]
- X.Sp
- and the following commands may be given at this level:
- X.Ip y,SP 8
- Do this newsgroup now.
- X.Ip .command 8
- Do this newsgroup now, but execute
- X.I command
- before displaying anything.
- The command will be interpreted as if given on the article selection level.
- X.Ip \+ 8
- XEnter this newsgroup through the thread selector.
- X.Ip = 8
- Start this newsgroup, but list subjects before displaying articles.
- X.Ip U 8
- XEnter this newsgroup through the \*(L"Set unread\*(R" prompt.
- X.Ip t 8
- Toggle the always-read-threaded flag for the current group.
- X.Ip n 8
- Go to the next newsgroup with unread news.
- X.Ip N 8
- Go to the next newsgroup.
- X.Ip p 8
- Go to the previous newsgroup with unread news.
- If there is none, stay at the current newsgroup.
- X.Ip P 8
- Go to the previous newsgroup.
- X.Ip \- 8
- Go to the previously displayed newsgroup (regardless of whether it is
- before or after the current one in the list).
- X.Ip 1 8
- Go to the first newsgroup.
- X.Ip ^ 8
- Go to the first newsgroup with unread news.
- X.Ip $ 8
- Go to the end of the newsgroups list.
- X.Ip "g newsgroup" 8
- Go to
- X.IR newsgroup .
- If it isn't currently subscribed to, you will be asked if you want to
- subscribe.
- X.Ip "/pattern" 8
- Scan forward for a newsgroup matching
- X.IR pattern .
- Patterns do globbing like filenames, i.e., use ? to match a single
- character, * to match any sequence of characters, and [] to specify a list
- of characters to match.
- X(\*(L"all\*(R" may be used as a synonym for \*(L"*\*(R".)
- Unlike normal filename globbing, newsgroup searching is not anchored to
- the front and back of the filename, i.e. \*(L"/ski\*(R" will find
- rec.skiing.
- You may use ^ or $ to anchor the front or back of the search:
- X\*(L"/^test$\*(R" will find newsgroup test and nothing else
- If you want to include newsgroups with 0 unread articles, append /r.
- If the newsgroup is not found between the current newsgroup and the last
- newsgroup, the search will wrap around to the beginning.
- X.Ip "?pattern" 8
- Same as /, but search backwards.
- X.Ip u 8
- Unsubscribe from the current newsgroup.
- X.Ip "l string" 8
- List newsgroups not subscribed to which contain the string specified.
- X.Ip L 8 13v
- Lists the current state of the
- X.IR .newsrc ,
- along with status information.
- X.Sp
- X.nf
- X \h'|0.5i'Status \h'|2i'Meaning
- X \h'|0.5i'<number> \h'|2i'Count of unread articles in newsgroup.
- X \h'|0.5i'READ \h'|2i'No unread articles in newsgroup.
- X \h'|0.5i'UNSUB \h'|2i'Unsubscribed newsgroup.
- X \h'|0.5i'BOGUS \h'|2i'Bogus newsgroup.
- X \h'|0.5i'JUNK \h'|2i'Ignored line in .newsrc
- X\h'|2i'(e.g. readnews \*(L"options\*(R" line).
- X.fi
- X.Sp
- X(A bogus newsgroup is one that is not in the list of active newsgroups
- in the active file, which on most systems is /usr/lib/news/active unless
- you use NNTP.)
- X.Ip "m name" 8
- Move the named newsgroup somewhere else in the
- X.IR .newsrc .
- If no name is given, the current newsgroup is moved.
- There are a number of ways to specify where you want the newsgroup\*(--type
- h for help when it asks where you want to put it.
- X.Ip c 8
- Catch up\*(--mark all unread articles in this newsgroup as read.
- X.Ip "o pattern" 8
- Only display those newsgroups whose name matches
- X.IR pattern .
- Patterns are the same as for the \*(L'/\*(R' command.
- Multiple patterns may be separated by spaces, just as on the
- command line.
- The restriction will remain in effect either until there are no articles
- left in the restricted set of newsgroups, or another restriction command
- is given.
- Since
- X.I pattern
- is optional, \*(L'o\*(R' by itself will remove the
- restriction.
- X.Ip "a pattern" 8
- Add new newsgroups matching
- X.IR pattern .
- Newsgroups which are already in your
- X.I .newsrc
- file, whether subscribed to or
- not, will not be listed.
- If any new newsgroups are found, you will be asked for each one whether
- you would like to add it.
- If you want to add all new newsgroups, you can
- type \*(L'Y\*(R' and they will be added the the end of the
- X.I .newsrc
- file and as groups you want to read.
- If you don't want to subscribe, all
- the new groups can be added by typing \*(L'N\*(R'.
- After any new newsgroups have been added, the \*(L'a\*(R' command also
- restricts the current set of newsgroups just like the \*(L'o\*(R' command
- does.
- X.Ip & 8
- Print out the current status of command line switches and any newsgroup
- restrictions.
- X.Ip "&switch {switch}" 8
- Set additional command line switches.
- X.Ip && 8
- Print out the current macro definitions.
- X.Ip "&&keys commands" 8
- Define additional macros.
- X.Ip !command 8
- XEscape to a subshell.
- One exclamation mark (!) leaves you in your own news directory.
- A double exclamation mark (!!) leaves you in the spool
- directory for news, which on most systems is /usr/spool/news if NNTP is not being used.
- The environment variable SHELL will be used if defined.
- If
- X.I command
- is null, an interactive shell is started.
- X.Ip q 8
- Quit.
- X.Ip x 8
- Quit, restoring .newsrc to its state at startup of
- X.IR trn .
- The .newsrc you would have had if you had exited with \*(L'q\*(R' will be
- called .newnewsrc, in case you didn't really want to type \*(L'x\*(R'.
- X.Ip ^K 8
- XEdit the global KILL file.
- This is a file which contains /pattern/j commands (one per line) to be
- applied to every newsgroup as it is started up, that is, when it is
- selected on the newsgroup selection level.
- The purpose of a KILL file is to mark articles as read on the basis of some
- set of patterns.
- This saves considerable wear and tear on your \*(L'n\*(R' key.
- There is also a local KILL file for each newsgroup.
- Because of the overhead involved in searching for articles to kill, it is
- better if possible to use a local KILL file.
- Local KILL files are edited with a \*(L'^K\*(R' on the article selection level.
- There are also automatic ways of adding search commands to the local KILL
- file\*(--see the \*(L'K\*(R' and \*(L'T\*(R' commands, and the K search
- modifier on the article selection level.
- X.Sp
- If either of the environment variables VISUAL or EDITOR is set, the
- specified editor will be invoked; otherwise a default editor (normally vi(1))
- is invoked on the KILL file.
- X.Sh "Thread Selection Level"
- Most people who don't have all day to read news will want to enter a newsgroup
- by way of the thread selector.
- This is accomplished by using the \*(L'+\*(R'
- command at the newsgroup selection level.
- In fact, this may be the default command for entering a newsgroup, depending
- on how your version of
- X.I trn
- was configured (see the
- X.B \-X
- option for how to turn this default on or off).
- The thread selector displays a list of article subjects and (optionally)
- authors grouped into threads.
- A thread may contain multiple subjects if the subject changes as the
- discussion continues.
- Also displayed is a count of the number of unread articles in each thread.
- XEach thread is preceded by a letter or number that can be typed to select it.
- Selected threads are flagged with a \*(L'+\*(R'.
- X.Sp
- The default is to display the long mode of the thread selector.
- In this mode, all the authors of the articles in the thread are summarized,
- one per line (authors of multiple articles are listed only once).
- The medium display mode groups multiple authors onto the same line, so that
- more threads can be displayed at one time.
- The short display mode does not display any author names, and can display
- more characters in the subject.
- X.PP
- The following commands are available in the thread selector:
- X.Ip "a-z,0-9" 8
- Select the discussion thread by its letter or number;
- press again to deselect.
- By default the letters h, k, n, p, q, and y are omitted to allow them
- to be typed as commands.
- See the variable SELECTCHARS to customize this.
- X.Ip SP 8
- Perform the default command.
- This is usually > for most pages, and Z on the last page (although D and X
- are also quite popular).
- X.Ip CR 8
- Read the current thread (if none are selected) or all the selected threads.
- X.Ip "Z,TAB" 8
- Begin reading the selected threads.
- If none are are selected, read everything.
- X.Ip "y, \*(L'.\*(R'" 8
- Toggle the current thread's selection (the one under the cursor).
- X.Ip "k, \*(L',\*(R'" 8
- Mark the current thread as killed.
- X.Ip "m, \e" 8
- Unmark the current thread.
- X.Ip \- 8
- Set a range, as in 2 \- 5.
- Repeats the last marking action: selected, unselected, killed, or unmarked.
- X.Ip @ 8
- Toggle all visible article selections.
- X.Ip < 8
- Go to previous page.
- X.Ip > 8
- Go to next page.
- X.Ip "p, [" 8
- Move up to the previous thread.
- X.Ip "n, ]" 8
- Move down to the next thread.
- X.Ip ^ 8
- Go to first page.
- X.Ip $ 8
- Go to last page.
- X.Ip X 8
- Mark all unselected articles as read and start reading.
- X.Ip J 8
- Mark all selected articles as read (useful after performing some action
- on them with the \*(L':\*(R' command).
- X.Ip D 8
- Mark unselected articles on the current page as read.
- Begin reading if articles are selected, otherwise go to the next page.
- X.Ip ^K 8
- XEdit the local KILL file for this newsgroup.
- A detailed description of KILL files is found in the Article Selection section.
- X.Ip ":command" 8
- XExecute a command upon all the selected threads and their articles.
- If no threads are selected, all threads with unread articles are affected.
- X.Sp
- Applicable commands include \*(L'+\*(R' and \*(L'-\*(R' (select and unselect
- thread), \*(L'T\*(R' (trash the thread into the local KILL file), \*(L't\*(R'
- X(display article tree), \*(L"s dest\*(R" (save article to a destination),
- X\*(L"e dir\*(R" (extract to directory), \*(L'E\*(R' (end partial uudecode),
- as well as: S, |, w, W, m, M, j, = and ','.
- X.Ip "/pattern" 8
- Scan all articles for a subject containing
- X.I pattern
- and select its thread.
- X.Ip "/pattern/modifiers:command{:command}" 8
- Apply the commands listed to articles matching the search command (possibly
- with h, a, r, or K modifiers).
- The default action, if no command is specified, is to select the parent
- thread of the matching article (the \*(L'+\*(R' command).
- See the section on Regular Expressions, and the description of pattern
- searching in the Article Selection section.
- X.Sp
- One example: to scan all the unread articles looking for \*(L"topic\*(L"
- anywhere in the article and then select its thread and save the article to
- the files topic.1, topic.2, etc. use \*(L"/topic/a:+:s topic.%#\*(R".
- X.Ip N 8
- Go to the next newsgroup with unread news.
- X.Ip P 8
- Go to the previous newsgroup with unread news.
- X.Ip U 8
- Switch between selecting read/unread articles.
- X.Ip L 8
- Switch the current display mode between the long and medium modes
- X(with authors) and the short mode.
- X(See the
- X.B \-x
- option to select your favorite mode as the default.)
- X.Ip & 8
- Display or set the current status of command line switches.
- X.Ip && 8
- Display or set the current macro definitions.
- X.Ip !command 8
- XEscape to a subshell.
- X.Ip q 8
- Quit this group.
- X.Ip "ESC,+" 8
- Quit the thread selector (back) to the article level.
- X.Ip Q 8
- Quit the current newsgroup and return to the newsgroup selection prompt
- for this group.
- X.Sh "Article Selection Level"
- On the article selection level,
- X.I trn
- displays unread articles in thread sequence, reading each article and its
- replies before going on to another topic.
- If threads are disabled for a particular group, the default order is
- in numeric sequence (the order they arrived at your site) unless you
- use subject search (^N) to change the default order to be
- numerical order within each matching subject.
- X(The
- X.B \-S
- switch can be used to make subject search mode the default for unthreaded
- groups.)
- X.Sp
- On the article selection level you are
- X.I not
- asked whether you want to read an article before the article is displayed;
- rather,
- X.I trn
- simply displays the first page (or portion of a page, at low baud rates) of the
- article and asks if you want to continue.
- The normal article selection prompt comes at the END of the article
- X(though article selection commands can be given from within the middle
- of the article (the pager level) also).
- The prompt at the end of an article looks like this:
- X.Sp
- XEnd of article 248 (of 257)\*(--what next? [npq]
- X.Sp
- The following are the options at this point:
- X.Ip n,SP 8
- Scan forward for next unread article.
- X(Note: the \*(L'n\*(R' (next) command when typed at the end of an article
- does not mark the article as read, since an article is automaticaly marked
- as read after the last line of it is printed.
- It is therefore possible to type a sequence such as \*(L'mn\*(R' and leave
- the article marked as unread.
- The fact that an article is marked as read by typing n, N, ^N, e, s, S, |,
- w, or W within the MIDDLE of the article is in fact a special case.)
- X.Ip N 8
- Go to the next article.
- X.Ip ^N 8
- Scan forward for the next article with the same subject.
- If the group is unthreaded this also makes subject search mode (^N)
- the default.
- X.Ip p 8
- Scan backward for previous unread article.
- If there is none, stay at the current article.
- X.Ip P 8
- Go to the previous article.
- X.Ip \- 8
- Go to the previously displayed article (regardless of whether that article
- is before or after this article in the normal sequence).
- X.Ip ^P 8
- Scan backward for the previous article with the same subject.
- Makes subject search mode (^N) the default if the group is unthreaded.
- X.Ip "<,>" 8
- Browse the previous/next selected thread.
- If no selections have been made, all the threads that had unread news when
- you entered the newsgroup (or last left the thread selector) are treated
- as selected.
- XEntering an empty newsgroup makes all the already-read threads available
- for browsing.
- X.Ip "[,]" 8
- Proceed to the left/right in the article tree.
- Visits already-read articles as well as empty nodes.
- If you attempt to go past the left/right edge of the tree, you are advanced
- to the previous/next line if available.
- X.Ip "{,}" 8
- Go to the root/leaf of the article tree, even if the node is
- already read or empty.
- Proceeds to the very first/last node if you're already at a root/leaf in
- a multi-root thread.
- X.Ip t 8
- Display the entire article tree and all its associated subjects.
- If the group is not currently threaded, it will be turned on and
- processed as needed.
- X.Ip ^R 8
- Restart the current article.
- X.Ip v 8
- Restart the current article verbosely, displaying the entire header.
- X.Ip ^L 8
- Refresh the screen.
- X.Ip ^X 8
- Restart the current article, and decrypt as a rot13 message.
- X.Ip X 8
- Refresh the screen, and decrypt as a rot13 message.
- X.Ip b 8
- Back up one page.
- X.Ip q 8
- Quit this newsgroup and go back to the newsgroup selection level.
- X.Ip ^ 8
- Go to the first unread article.
- X.Ip $ 8
- Go to the last article (actually, one past the last article).
- X.Ip "number" 8
- Go to the numbered article.
- X.Ip "range{,range}:command{:command}" 8
- Apply a set of commands to a set of articles.
- A range consists of either <article number> or
- X<article\ number>\-<article\ number>.
- A dot \*(L'.\*(R' represents the current article, and a dollar
- sign \*(L'$\*(R' represents the last article.
- X.Sp
- Applicable commands include \*(L'm\*(R' (mark as unread), \*(L'M\*(R'
- X(delayed mark as unread), \*(L'j\*(R' (mark as read), \*(L"s dest\*(R"
- X(save to a destination), \*(L"e dir"\*(R" (extract to directory),
- X\&\*(L"!command\*(R" (shell escape), \*(L"=\*(R" (print the subject),
- X\&\*(L'T\*(R' (trash the thread into the local KILL file), \*(L'+\*(R'
- X(select the thread), \*(L'-\*(R' (deselect the thread), \*(L'C\*(R'
- X(cancel), as well as S, |, w, W, and t.
- X.Ip ":command" 8
- Apply a command to all selected threads and their articles.
- If no threads are selected, apply the command to all the unread threads.
- XFor applicable commands, see the discussion above for the range command.
- X.Ip j 8
- Junk the current article\*(--mark it as read.
- If this command is used from within an article, you are left at the end of
- the article, unlike \*(L'n\*(R', which looks for the next article.
- X.Ip m 8
- Mark the current article as still unread.
- X(If you are in subject search mode you probably want to use M instead of m.
- Otherwise the current article may be selected as the beginning of the next
- subject thread.)
- X.Ip M 8
- Mark the current article as still unread, but not until the newsgroup
- is exited.
- Until then, the current article will be marked as read.
- This is useful for returning to an article in another session, or in another
- newsgroup.
- X.Ip /pattern 8
- Scan forward for article containing
- X.I pattern
- in the subject.
- See the Regular Expressions section.
- Together with the escape substitution facility described later, it becomes
- easy to search for various attributes of the current article, such as
- subject, article ID, author name, etc.
- The previous pattern can be recalled with \*(L"<esc>/\*(R".
- If
- X.I pattern
- is omitted, the previous pattern is assumed.
- X.Ip /pattern/h 8
- Scan forward for article containing
- X.I pattern
- in the header.
- X.Ip /pattern/a 8
- Scan forward for article containing
- X.I pattern
- anywhere in article.
- X.Ip /pattern/r 8
- Scan read articles also.
- X.Ip /pattern/c 8
- Make search case sensitive.
- Ordinarily upper- and lower-case are considered the same.
- X.Ip "/pattern/modifiers:command{:command}" 8
- Apply the commands listed to articles matching the search command (possibly
- with h, a, or r modifiers).
- Applicable commands include \*(L'm\*(R' (mark as unread), \*(L'M\*(R'
- X(delayed mark as unread), \*(L'j\*(R' (mark as read), \*(L"s dest\*(R"
- X(save to a destination), \*(L"e dir"\*(R" (extract to directory),
- X\&\*(L"!command\*(R" (shell escape), \*(L"=\*(R" (print the subject),
- X\&\*(L'T\*(R' (trash the associated thread and put it in the local KILL
- file), \*(L'+\*(R' (select the associated thread), \*(L'-\*(R' deselect
- the associated thread), and \*(L'C\*(R' (cancel).
- If the first command is \*(L'm\*(R' or \*(L'M\*(R', modifier r is assumed.
- A K may be included in the modifiers (not the commands) to cause the
- entire command (sans K) to be saved to the local KILL file, where it will
- be applied to every article that shows up in the newsgroup.
- X.Sp
- XFor example, to save all articles in a given newsgroup to the line printer
- and mark them read, use \*(L"/^/\||\|lpr:j\*(R".
- If you type \*(L"/^/K\||\|lpr:j\*(R", this will happen every time you enter the
- newsgroup.
- X.Ip ?pattern 8
- Scan backward for article containing
- X.I pattern
- in the subject.
- May be modified as the forward search is: ?pattern?modifiers[:commands].
- It is likely that you will want an r modifier when scanning backward.
- X.Ip k 8
- Mark as read all articles with the same subject as the current article.
- X(Note: there is no single character command to temporarily mark as read (M
- command) articles matching the current subject.
- That can be done with \*(L"/<esc>s/M\*(R", however.)
- X.Ip \, 8
- Mark the current article and all its replies as read.
- X.Ip J 8
- Junk all the articles in the thread, even if it contains multiple subjects.
- X.Ip K 8
- Do the same as the k command, but also add a line to the local KILL file for
- this newsgroup to kill this subject every time the newsgroup is started up.
- XFor a discussion of KILL files, see the \*(L'^K\*(R' command below.
- See also the K modifier on searches above.
- X.Ip T 8
- Kill the current thread, and also add a line to the local KILL file for
- this newsgroup to kill new articles attached to this thread every time the
- newsgroup is started up.
- X.Ip ^K 8
- XEdit the local KILL file for this newsgroup.
- XEach line of the KILL file should be a subject-killing command of the
- form /pattern/j or a thread killing command of the form T<number>.
- The thread killing commands are usually followed by a comment to let
- you know the primary subject of the numbered thread being killed.
- The first line in the KILL file has the form \*(L"THRU <number>\*(R",
- which tells
- X.I trn
- the maximum article number that the KILL file has been applied to.
- X(You may delete the THRU line to force a rescan of current articles.)
- You may also have reason to use the m, h, or a modifiers.
- Be careful with the M modifier in a kill file\*(--there are more efficient
- ways to never read an article.
- You might have reason to use it if a particular series of articles is posted
- to multiple newsgroups.
- In this case, M would force you to view the article in a different newsgroup.
- X.Sp
- To see only newgroup articles in the control newsgroup, for instance, you
- might put
- X.Sp
- X/^/j
- X.br
- X/newgroup/m
- X.Sp
- which kills all subjects not containing \*(L"newgroup\*(R".
- You can add lines automatically via the K command and K search modifiers,
- but editing is the only way to remove lines.
- If either of the environment variables VISUAL or EDITOR is set, the
- specified editor will be invoked; otherwise a default editor (normally vi)
- is invoked on the KILL file.
- X.Sp
- The KILL file may also contain switch setting lines beginning with \*(L'&\*(R'.
- Additionally, any line beginning with \*(L'X\*(R' is executed on exit
- from the newsgroup rather than on entrance.
- This can be used to set switches back to a default value.
- One use for this capability is to set your save directory to a custom value
- upon entry to a newsgroup and set it back on exit using the \-ESAVEDIR option.
- See also the
- X.B \-/
- option for another solution to multiple save directories without using KILL
- files.
- X.Ip r 8
- Reply through net mail.
- The environment variables MAILPOSTER and MAILHEADER may be used to modify
- the mailing behavior of
- X.I trn
- X(see environment section).
- If on a nonexistent article such as the \*(L"End of newsgroup\*(R"
- pseudo-article
- X(which you can get to with a \*(L'$\*(R' command), invokes the mailer to
- nobody in particular.
- X.Ip R 8
- Reply, including the current article in the header file generated.
- X(See \*(L'F\*(R' command below).
- The YOUSAID environment variable controls the format of the attribution line.
- X.Ip f 8
- Submit a followup article.
- If on a nonexistent article such as the \*(L"End of newsgroup\*(R"
- pseudo-article
- X(which you can get to with a \*(L'$\*(R' command), posts an original
- article (basenote).
- X.Ip F 8
- Submit a followup article, and include the old article, with lines prefixed
- either by \*(L">\*(R" or by the argument to a
- X.B \-F
- switch.
- X.I Trn
- will attempt to provide an attribution line in front of the quoted article,
- generated from the From: line of the article.
- Unfortunately, the From: line doesn't always contain the right name; you
- should double check it against the signature and change it if necessary,
- or you may have to apologize for quoting the wrong person.
- The environment variables NEWSPOSTER, NEWSHEADER and ATTRIBUTION may be
- used to modify the posting behavior of
- X.I trn
- X(see environment section).
- X.Sp
- If you are starting a new subject, move to the end of the newsgroup
- with the \*(L'$\*(R' command before pressing \*(L'f\*(R'.
- Otherwise you may have to do a lot of header editing, including
- X.I "removing the References line"
- X-- this is IMPORTANT to remember ONLY when starting a new subject.
- It is much simpler to remember \*(L"$f\*(R" for new subjects, and to
- allways leave the References line alone.
- X.Ip C 8
- Cancel the current article, but only if you are the contributor or superuser.
- X.Ip z 8
- Supersede the current article, but only if you are the contributor.
- X.Ip c 8
- Catch up in this newsgroup; i.e., mark all articles as read.
- X.Ip U 8
- Mark some or all articles as unread.
- You can choose to mark the current thread, sub-thread (the current article
- and its replies), all the articles, or start up the thread selector
- to choose specific threads to set unread.
- X.Ip u 8
- Unsubscribe from this newsgroup.
- X.Ip "s destination" 8
- Save to a filename or pipe using sh.
- If the first character of the destination is a vertical bar, the rest of
- the command is considered a shell command to which the article is passed
- through standard input.
- The command is subject to filename expansion.
- X(See also the environment variable PIPESAVER.)
- If the destination does not begin with a vertical bar, the rest of the
- command is assumed to be a filename of some sort.
- An initial tilde \*(L'~\*(R' will be translated to the name of the home
- directory, and an initial environment variable substitution is also allowed.
- If only a directory name is specified, the environment variable SAVENAME
- is used to generate the actual name.
- If a non-absolute filename is specified, the environment variable
- SAVEDIR will be used to generate the actual directory.
- If nothing is specified, then obviously both variables will be used.
- Since the current directory for
- X.I trn
- while doing a save command is your
- private news directory, typing \*(L"s ./filename\*(R" will force the file
- to your news directory.
- Save commands are also run through % interpretation, so that you can
- enter \*(L"s %O/filename\*(R" to save to the directory you were in when you ran
- X.IR trn ,
- and \*(L"s %t\*(R" to save to a filename consisting of the Internet address
- of the sender.
- X.Sp
- After generating the full pathname of the file to save to,
- X.I trn
- determines if the file exists already, and if so, appends to it.
- X.I trn
- will attempt to determine if an existing file is a mailbox or a normal file,
- and save the article in the same format.
- If the output file does not yet exist,
- X.I trn
- will by default ask you which format you want, or you can make it skip the
- question with either the
- X.B \-M
- or
- X.B \-N
- switch.
- If the article is to be saved in mailbox format, the command to do so is
- generated from the environment variable MBOXSAVER.
- Otherwise, NORMSAVER is used.
- X.Ip "S destination" 8
- Save to a filename or pipe using a preferred shell, such as csh.
- Which shell is used depends first on what you have the environment variable
- SHELL set to, and in the absence of that, on what your news administrator
- set for the preferred shell when he or she installed
- X.IR trn .
- X.Ip "| command" 8
- Shorthand for \*(L"s | command\*(R".
- X.Ip "w destination" 8
- The same as \*(L"s destination\*(R", but saves without the header.
- X.Ip "W destination" 8
- The same as \*(L"S destination\*(R", but saves without the header.
- X.Ip "e directory" 8
- XExtract a shell archive or uuencoded binary to the designated directory.
- The article is first scanned to try discover what type of data is
- encapsulated.
- If a \*(L"cut here\*(R" line is found, the first non-blank line after it
- must be either the start of a shar header, or the \*(L"begin\*(R"
- or \*(L"table\*(R" line of a uuencoded binary.
- The default for extracting shars is to send the data portion of the file
- to /bin/sh, but that can be overridden with the UNSHAR variable (see the
- XENVIRONMENT section).
- Uudecoding is done internally by a decoder that can handle the data
- being split up over multiple articles, and extracted one piece at a time.
- To decode a multi-article file, either execute the \*(L'e\*(R'
- command in each article in sequence, use an article range to execute the
- command, or use the \*(L":e\*(R" command to repeat the command for each of the
- currently selected articles.
- When the \*(L'e\*(R' command is not followed by any arguments, it will
- repeat the arguments from the last extraction.
- All directory specifications are relative to the value of SAVEDIR, so you
- can use the command \*(L"e .\*(R" to force an extraction to SAVEDIR itself.
- If a uudecoding is in progress (i.e. the last piece wasn't extracted yet)
- and you exit the group, the partial file will be removed.
- This also occurs if you start to extract a new uuencoded file before the
- previous one was finished.
- See also the \*(L'E\*(R' command for ending a multi-part uudecoding
- manually.
- X.Sp
- There is one special case that is handled differently: if the first file in a
- recognizable shar file is a uuencoded binary that was packed with lines
- starting with an \*(L'X\*(R', we will not unshar the file but instead
- uudecode it.
- If this causes problems, you can override the default extraction method
- by following the directory with an explicit command to execute, as
- described below.
- X.Ip "e directory|command" 8
- This form of the \*(L'e\*(R' command allows you to extract other data
- formats than shar or uuencoded files or to override the decisions made
- by the automatic extraction selection described above.
- In normal operation, all data following what we recognize as
- a \*(L"cut here\*(R" line will be sent to the specified command.
- Additionally, the distinctive beginning of a shell archive is also recognized
- without a preceding cut line.
- When the command is run, the default directory will be set to the
- specified directory, or the value
- of SAVEDIR if unspecified.
- XEntering the \*(L'e\*(R' command without arguments will repeat your
- previous extract command.
- You can use the command \*(L"e dir|\*(R" to extract to a new directory
- using the previously-specified command.
- X.Ip E 8
- This command ends any multi-part uuencoded file extraction that you began,
- but are unable (or unwilling) to complete.
- The partially extracted file is removed.
- X.Ip & 8
- Print out the current status of command line switches.
- X.Ip "&switch {switch}" 8
- Set additional command line switches.
- X.Ip && 8
- Print out current macro definitions.
- X.Ip "&&keys commands" 8
- Define an additional macro.
- X.Ip !command 8
- XEscape to a subshell.
- One exclamation mark (!) leaves you in your own news directory.
- A double exclamation mark (!!) leaves you in the spool
- directory of the current newsgroup.
- The environment variable SHELL will be used if defined.
- If
- X.I command
- is null, an interactive shell is started.
- X.Sp
- You can use escape key substitutions described later to get to many
- run-time values.
- The command is also run through % interpretation, in case it is being called
- from a range or search command.
- X.Ip \+ 8
- Start the thread selector.
- If the newsgroup is unthreaded, the subject lister is called instead.
- X.Ip = 8
- List subjects of unread articles.
- X.Ip # 8
- Print last article number.
- X.Sh "Pager Level"
- At the pager level (within an article), the prompt looks like this:
- X.Sp
- X\*(--MORE\*(--(17%)
- X.Sp
- and a number of commands may be given:
- X.Ip SP 8
- Display next page.
- X.Ip x 8
- Display next page and decrypt as a rot13 message.
- X.Ip d 8
- Display half a page more.
- X.Ip CR 8
- Display one more line.
- X.Ip q 8
- Go to the end of the current article (don't mark it either read or unread).
- Leaves you at the \*(L"What next?\*(R" prompt.
- X.Ip j 8
- Junk the current article.
- Mark it read and go to the end of the article.
- X.Ip ^L 8
- Refresh the screen.
- X.Ip X 8
- Refresh the screen and decrypt as a rot13 message.
- X.Ip b 8
- Back up one page.
- X.Ip t 8
- Display the entire article tree, including its associated subjects, and
- continue reading.
- If the group is not currently threaded, it will be turned on and
- processed as needed.
- X.Ip gpattern 8
- Goto (search forward for)
- X.I pattern
- within current article.
- Note that there is no space between the command and the pattern.
- If the pattern is found, the page containing the pattern will be displayed.
- Where on the page the line matching the pattern goes depends on the value
- of the
- X.B \-g
- switch.
- By default the matched line goes at the top of the screen.
- X.Ip G 8
- Search for g pattern again.
- X.Ip ^G 8
- This is a special version of the \*(L'g\*(R' command that is for skipping
- articles in a digest.
- It is equivalent to setting \*(L"\-g4\*(R" and then executing the command
- X\*(L"g^Subject:\*(R".
- X.Ip TAB 8
- This is another special version of the \*(L'g\*(R' command that is for
- skipping inclusions of older articles.
- It is equivalent to setting \*(L"\-g4\*(R" and then executing the command
- X\*(L"g^[^c]\*(R", where \fIc\fR is the first character of the last line
- on the screen.
- It searches for the first line that doesn't begin with the same character
- as the last line on the screen.
- X.Ip !command 8
- XEscape to a subshell.
- X.PP
- The following commands skip the rest of the current article, then behave just
- as if typed to the \*(L"What next?\*(R" prompt at the end of the article.
- See the documentation at the article selection level for these commands.
- X.Sp
- X # $ & / = ? c C f F k K T ^K J , m M r R ^R u U v Y ^
- X.br
- X p P ^P - < > [ ] { } number
- X.br
- X range{,range} command{:command}
- X.Sp
- The following commands also skip to the end of the article, but have the
- additional effect of marking the current article as read:
- X.Sp
- X n N ^N e s S | w W
- X.Sp
- X.Sh "Miscellaneous facts about commands"
- An \*(L'n\*(R' typed at either the \*(L"Last newsgroup\*(R" prompt or a
- X\*(L"Last article\*(R" prompt will cycle back to the top of the newsgroup
- or article list, whereas a \*(L'q\*(R' will quit the level.
- X(Note that \*(L'n\*(R' does not mean \*(L"no\*(R", but rather
- X\*(L"next\*(R".)
- A space will of course do whatever is shown as the
- default, which will vary depending on whether
- X.I trn
- thinks you have more articles or newsgroups to read.
- X.PP
- The \*(L'b\*(R' (backup page) command may be repeated until the beginning of
- the article is reached.
- If
- X.I trn
- is suspended (via a ^Z), then when the job is resumed, a refresh (^L) will
- automatically be done (Berkeley-type systems only).
- If you type a command such as \*(L'!\*(R' or \*(L's\*(R' which takes you
- from the middle of the article to the end, you can always get back into the
- middle by typing \*(L'^L\*(R'.
- X.PP
- In multi-character commands such as \*(L'!\*(R', \*(L's\*(R', \*(L'/\*(R',
- etc, you can interpolate various run-time values by typing escape and a
- character.
- To find out what you can interpolate, type escape and \*(L'h\*(R', or check
- out the single character % substitutions for environment variables in the
- Interpretation and Interpolation section, which are the same.
- Additionally, typing a double escape will cause any % substitutions in the
- string already typed in to be expanded.
- X.Sh "The Tree Display"
- When reading a threaded newsgroup,
- X.I trn
- displays a character representation of the article tree in the upper right
- corner of the header.
- XFor example, consider the following display:
- X.Sp
- X.nf
- X (1)+-(1)--(\fI2\fP)--\fI[2]\fP
- X |-(1)+-[3]
- X | \\-[1]
- X \\-(1)+-[1]--[1]
- X \\-[1]
- X.fi
- X.Sp
- This tree represents an initial article that has three direct replies
- X(the second column with three (1)'s).
- XEach reply has further replies branching off from them.
- In two cases the subject line was altered in the reply, as indicated
- by the increasing numbers.
- When there is only one subject associated with a thread, all the nodes
- are marked with the number 1.
- When the first subject change arrives, it is marked with the number 2,
- and so on.
- If you were to look at this thread in the thread selector, the three
- subjects associated with it would be listed in the same order as the
- ascending digits.
- In those rare cases where more than 9 subjects are associated with each
- thread, the nodes are marked with the letters A-Z, and then by a-z.
- The articles that have already been read are enclosed in ()'s.
- Unread articles are displayed in []'s.
- The currently displayed article has its entire node highlighted in the
- display.
- The previously displayed article has only its number highlighted.
- X.Sh "Options"
- X.I Trn
- has a nice set of options to allow you to tailor the interaction
- to your liking.
- X(You might like to know that the author swears by
- X\*(L"\-x6ls \-e \+m \-S -XX -N\*(R".)
- These options may be set on the command line, via the TRNINIT
- environment variable, via a file pointed to by the TRNINIT variable, or
- from within
- X.I trn
- via the & command.
- Options may generally be unset by typing \*(L"+switch\*(R".
- Options include:
- X.TP 5
- X.B \-a
- causes trn to always thread a group that doesn't have a pre-created
- thread file.
- Without this option you have to toggle each group with the \*(L't\*(R'
- command at the newsgroup prompt to force it to be read threaded even
- if no thread file for the group exists.
- X.TP 5
- X.B \-c
- checks for news without reading news.
- If a list of newsgroups is given on the command line, only those newsgroups
- will be checked; otherwise all subscribed-to newsgroups are checked.
- Whenever the
- X.B \-c
- switch is specified, a non-zero exit status from
- X.I trn
- means that there is unread news in one of the checked newsgroups.
- The
- X.B \-c
- switch does not disable the printing of newsgroups with unread news;
- this is controlled by the
- X.B \-s
- switch.
- X(The
- X.B \-c
- switch is not meaningful when given via the & command.)
- X.TP 5
- X.B \-C<number>
- tells
- X.I trn
- how often to checkpoint the
- X.IR .newsrc ,
- in articles read.
- Actually, this number says when to start thinking about doing a checkpoint
- if the situation is right.
- If a reasonable checkpointing situation doesn't arise within 10 more
- articles, the
- X.I .newsrc
- is checkpointed willy-nilly.
- X.TP 5
- X.B \-d<directory name>
- sets the default save directory to something other than ~/News.
- The directory name will be globbed (via csh) if necessary (and if possible).
- Articles saved by
- X.I trn
- may be placed in the save directory or in a subdirectory thereof depending
- on the command that you give and the state of the environment variables
- SAVEDIR and SAVENAME.
- Any KILL files (see the K command in the Article Selection section)
- also reside in this directory and its subdirectories, by default.
- In addition, shell escapes leave you in this directory.
- X.TP 5
- X.B \-D<flags>
- enables debugging output.
- See common.h for flag values.
- Warning: normally
- X.I trn
- attempts to restore your
- X.I .newsrc
- when an unexpected signal or internal error occurs.
- This is disabled when any debugging flags are set.
- X.TP 5
- X.B \-e
- causes each page within an article to be started at the top of the screen,
- not just the first page.
- X(It is similar to the
- X.B \-c
- switch of
- X.IR more (1).)
- You never have to read scrolling text with this switch.
- This is helpful especially at certain baud rates because you can start reading
- the top of the next page without waiting for the whole page to be printed.
- It works nicely in conjunction with the
- X.B \-m
- switch, especially if you use half-intensity for your highlight mode.
- See also the
- X.B \-L
- switch.
- X.TP 5
- X.B \-E<name>=<val>
- sets the environment variable <name> to the value specified.
- Within
- X.IR trn ,
- X\*(L"&\-ESAVENAME=%t\*(R" is similar to \*(L"setenv SAVENAME '%t'\*(R" in
- X.IR csh ,
- or \*(L"SAVENAME='%t'; export SAVENAME\*(R" in
- X.IR sh .
- Any environment variables set with
- X.B \-E
- will be inherited by subprocesses of
- X.IR trn .
- X.TP 5
- X.B \-F<string>
- sets the prefix string for the \*(L'F\*(R' followup command to use in
- prefixing each line of the quoted article.
- XFor example, \*(L"\-F<tab>\*(R" inserts a tab on the front of each line
- X(which will cause long lines to wrap around, unfortunately),
- X\*(L"\-F>>>>\*(R" inserts \*(L">>>>\*(R" on every line, and
- X\*(L"\-F\*(R" by itself causes nothing to be inserted, in case you want to
- reformat the text, for instance.
- The initial default prefix is \*(L">\*(R".
- X.TP 5
- X.B \-g<line>
- tells
- X.I trn
- which line of the screen you want searched-for strings to show up on when
- you search with the \*(L'g\*(R' command within an article.
- The lines are numbered starting with 1.
- The initial default is \*(L"\-g1\*(R", meaning the first line of the screen.
- Setting the line to less than 1 or more than the number of lines on the screen
- will set it to the last line of the screen.
- X.TP 5
- X.B \-h<string>
- hides (disables the printing of) all header lines beginning with
- X.I string.
- XFor instance, \-hexp will disable the printing of the \*(L"Expires:\*(R" line.
- Case is insignificant.
- If <string> is null, all header lines except Subject are hidden, and you
- may then use
- X.B +h
- to select those lines you want to see.
- You may wish to use the baud-rate switch modifier below to hide more lines
- at lower baud rates.
- X.TP 5
- X.B \-H<string>
- works just like
- X.B \-h
- except that instead of setting the hiding flag for a header line, it sets
- the magic flag for that header line.
- Certain header lines have magic behavior that can be controlled this way.
- At present, the following actions are caused by the flag for the particular
- line:
- the Date line prints the date in local time if the group is threaded;
- the From line will only print the commented portion of the user name;
- the Newsgroups line will only print when there are multiple newsgroups;
- the Subject line will be underlined and (when threaded) the
- keyword \*(L'Subject:\*(R' is replaced by its subject number (e.g. [1]);
- and the Expires line will always be suppressed if there is nothing on it.
- In fact, all of these actions are the default, and you must use
- X.B +H
- to undo them.
- X.TP 5
- X.B \-i=<number>
- specifies how long (in lines) to consider the initial page of an
- article\*(--normally this is determined automatically depending on baud rate.
- X(Note that an entire article header will always be printed regardless of the
- specified initial page length.
- If you are working at low baud rate and wish to reduce the size of the
- headers, you may hide certain header lines with the
- X.B \(bsh
- switch.)
- X.TP 5
- X.B \-l
- disables the clearing of the screen at the beginning of each
- article, in case you have a bizarre terminal.
- X.TP 5
- X.B \-L
- tells
- X.I trn
- to leave information on the screen as long as possible by not blanking
- the screen between pages, and by using clear to end-of-line.
- X(The
- X.IR more (1)
- program does this.)
- This feature works only if you have the requisite termcap
- capabilities.
- The switch has no effect unless the
- X.B \-e
- switch is set.
- X.TP 5
- X.B \-m=<mode>
- enables the marking of the last line of the previous page
- printed, to help the user see where to continue reading.
- This is most helpful when less than a full page is going to be displayed.
- It may also be used in conjunction with the
- X.B \-e
- switch, in which case the page is erased, and the first line (which is
- the last line of the previous page) is highlighted.
- If
- X.B \-m=s
- is specified, the standout mode will be used, but if
- X.B \-m=u
- is specified, underlining will be used.
- If neither
- X.B =s
- or
- X.B =u
- is specified, standout is the default.
- Use
- X.B +m
- to disable highlighting.
- X.TP 5
- X.B \-M
- forces mailbox format in creating new save files.
- Ordinarily you are asked which format you want.
- X.TP 5
- X.B \-N
- forces normal (non-mailbox) format in creating new save files.
- Ordinarily you are asked which format you want.
- X.TP 5
- X.B \-o
- will act like old versions of trn and not chase xrefs when junking
- articles via thread commands.
- Using
- X.B \-o2
- will also disable the database lookup for all article-junking commands.
- This slows down the junking of non-xrefed articles, but enables trn 2.\|0
- to be run using a database from a pre-2.\|0 mthreads.
- X.TP 5
- X.B \-q
- bypasses the automatic check for new newsgroups when starting
- X.IR trn .
- X.TP 5
- X.B \-r
- causes
- X.I trn
- to restart in the last newsgroup read during a previous session with
- X.IR trn .
- It is equivalent to starting up normally and then getting to the newsgroup
- with a g command.
- X.TP 5
- X.B \-s
- with no argument suppresses the initial listing of newsgroups with unread
- news, whether
- X.B \-c
- is specified or not.
- Thus
- X.B \-c
- and
- X.B \-s
- can be used together to test \*(L"silently\*(R" the status of news from
- within your
- X.I .login
- file.
- If
- X.B \-s
- is followed by a number, the initial listing is suppressed after that many
- lines have been listed.
- Presuming that you have your
- X.I .newsrc
- sorted into order of interest,
- X.B \-s5
- will tell you the 5 most interesting newsgroups that have unread news.
- This is also a nice feature to use in your
- X.I .login
- file, since it not only tells you whether there is unread news, but also how
- important the unread news is, without having to wade through the entire
- list of unread newsgroups.
- If no
- X.B \-s
- switch is given
- X.B \-s5
- is assumed, so just putting \*(L"rn \-c\*(R"
- into your
- X\&.login file is fine.
- X.TP 5
- X.B \-S<number>
- causes
- X.I trn
- to enter subject search mode (^N) automatically whenever an unthreaded
- newsgroup is
- started up with <number> unread articles or more.
- Additionally, it causes any \*(L'n\*(R' typed while in subject search mode
- to be interpreted as \*(L'^N\*(R' instead.
- X(To get back out of subject search mode, the best command is probably
- X\&\*(L'^\*(R'.)
- If <number> is omitted, 3 is assumed.
- X.TP 5
- X.B \-t
- puts
- X.I trn
- into terse mode.
- This is more cryptic but useful for low baud rates.
- X(Note that your system administrator may have compiled
- X.I trn
- with either verbose or terse messages only to save memory.)
- You may wish to use the baud-rate switch modifier below to enable terse mode
- only at lower baud rates.
- X.TP 5
- X.B \-T
- allows you to type ahead of rn.
- Ordinarily rn will eat typeahead to prevent your autorepeating space bar from
- doing a very frustrating thing when you accidentally hold it down.
- If you don't have a repeating space bar, or you are working at low baud
- rate, you can set this switch to prevent this behavior.
- You may wish to use the baud-rate switch modifier below to disable typeahead
- only at lower baud rates.
- X.TP 5
- X.B \-v
- sets verification mode for commands.
- When set, the command being executed is displayed to give some feedback that
- the key has actually been typed.
- Useful when the system is heavily loaded and you give a command that takes
- a while to start up.
- X.TP 5
- X.B \-x<number><list>
- XEnable the extended (threaded) features of
- X.I trn
- beyond the traditional
- X.I rn
- compatibility mode.
- X(This may be the default on your system, use +x if you yearn for the good
- ol' days.)
- The <number> is the maximum number of article-tree lines (from 0 to 11)
- you want displayed in your header.
- Use the <list> to choose which thread selector modes you like (s \- short,
- m \- medium, or l \- long), and in what order they are selected with the
- X\&\*(L'L\*(R' command.
- XFor example, use
- X.B \-xls
- to start with the long display mode and only switch between it and
- the short mode.
- You can omit either or both of the parameters, in which case a default of
- X.B \-x6lsm
- is assumed.
- X.TP 5
- X.B \-X<number><commands>
- If you like using the thread selector, you'll probably want to use this
- option to make the thread selector command (+) the default when a newsgroup
- is started up with at least <number> unread articles.
- X(Your installer may have chosen to make -X1 the default on your system.)
- It is also used to select which commands you want to be the defaults while
- using the thread selector.
- XFor example,
- X.B \-X2XD
- will make the thread selector the default command for entering a newsgroup
- with at least 2 unread articles, and set the default command for the LAST
- page of the thread selector to be the
- X.B X
- command and the default command for all other pages to be the
- X.B D
- command.
- XEither or both parameters can be omitted, as well as the second default
- command (e.g.
- X.B \-XX
- would change the default newsgroup entry to use the selector and the default
- command for the last page of the selector to be \*(L'X\*(R').
- The default is
- X.B \-X1Z>
- if just
- X.B \-X
- is specified.
- To set the default selector commands without affecting the default entry
- into a newsgroup, specify a high number, like 9999.
- X.TP 5
- X.B \-/
- sets SAVEDIR to \*(L"%p/%c\*(R" and SAVENAME to \*(L"%a\*(R", which means
- that by default articles are saved in a subdirectory of your private news
- directory corresponding to the name of the the current newsgroup, with the
- filename being the article number.
- X.B +/
- sets SAVEDIR to \*(L"%p\*(R" and SAVENAME to \*(L"%^C\*(R", which by
- default saves articles directly to your private news directory, with the
- filename being the name of the current newsgroup, first letter capitalized.
- X(Either
- X.B +/
- or
- X.B \-/
- may be default on your system, depending on the feelings of your news
- administrator when he, she or it installed
- X.IR trn .)
- You may, of course, explicitly set SAVEDIR and SAVENAME to other values\*(--see
- discussion in the environment section.
- X.PP
- Any switch may be selectively applied according to the current baud-rate.
- Simply prefix the switch with +speed to apply the switch at that speed or
- greater, and \%\-speed to apply the switch at that speed or less.
- XExamples: \%\-1200\-hposted suppresses the Posted line at 1200 baud or less;
- X\%+9600\-m enables marking at 9600 baud or more.
- You can apply the modifier recursively to itself also: \%+300\-1200\-t sets
- terse mode from 300 to 1200 baud.
- X.PP
- Similarly, switches may be selected based on terminal type:
- X.Sp
- X \-=vt100+T set +T on vt100
- X.br
- X \-=tvi920\-ETERM=mytvi get a special termcap entry
- X.br
- X \-=tvi920\-ERNMACRO=%./.rnmac.tvi
- X.br
- X set up special keymappings
- X.br
- X +=paper\-v set verify mode if not hardcopy
- X.PP
- Some switch arguments, such as environment variable values, may require
- spaces in them.
- Such spaces should be quoted via ", ', or \e in the conventional fashion,
- even when passed via TRNINIT or the & command.
- X.Sh "Regular Expressions"
- The patterns used in article searching are regular expressions such as
- those used by
- X.IR ed (1).
- In addition, \ew matches an alphanumeric character and \eW a nonalphanumeric.
- Word boundaries may be matched by \eb, and non-boundaries by \eB.
- The bracketing construct \e(\ ...\ \e) may also be used, and \edigit matches
- the digit'th substring, where digit can range from 1 to 9.
- X\e0 matches whatever the last bracket match matched.
- Up to 10 alternatives may given in a pattern, separated by \e|, with the
- caveat that \e(\ ...\ \e|\ ...\ \e) is illegal.
- X.Sh "Interpretation and Interpolation"
- Many of the strings that
- X.I trn
- handles are subject to interpretations of several types.
- Under filename expansion, an initial \*(L"~/\*(R" is translated to the name
- of your home directory, and \*(L"~name\*(R" is translated to the login
- directory for the user specified.
- XFilename expansion will also expand an initial environment variable, and
- also does the backslash, uparrow and percent expansion mentioned below.
- X.PP
- All interpreted strings go through backslash, uparrow and percent
- interpretation.
- The backslash escapes are the normal ones (such as \en, \et, \ennn, etc.).
- The uparrow escapes indicate control codes in the normal fashion.
- Backslashes or uparrows to be passed through should be escaped with backslash.
- The special percent escapes are similar to printf percent escapes.
- These cause the substitution of various run-time values into the string.
- The following are currently recognized:
- X.Ip %a 8
- Current article number.
- X.Ip %A 8
- XFull name of current article (%P/%c/%a).
- X.Ip %b 8
- Destination of last save command, often a mailbox.
- X.Ip %B 8
- The byte offset to the beginning of the part of the article to be saved,
- set by the save command.
- The \*(L's\*(R' and \*(L'S\*(R' commands set it to 0, and the \*(L'w\*(R'
- and \*(L'W\*(R' commands set it to the byte offset of the body of the article.
- X.Ip %c 8
- Current newsgroup, directory form.
- X.Ip %C 8
- Current newsgroup, dot form.
- X.Ip %d 8
- XFull name of newsgroup directory (%P/%c).
- X.Ip %D 8
- X\*(L"Distribution:\*(R" line from the current article.
- X.Ip %e 8
- The last command executed to extract data from an article.
- X.Ip %E 8
- The last directory where an extracted file went.
- X.Ip %f 8
- X\*(L"From:\*(R" line from the current article, or the \*(L"Reply-To:\*(R"
- line if there is one.
- This differs from %t in that comments (such as the full name) are not
- stripped out with %f.
- X.Ip %F 8
- X\*(L"Newsgroups:\*(R" line for a new article, constructed from
- X\*(L"Newsgroups:\*(R" and \*(L"Followup-To:\*(R" lines of current article.
- X.Ip %h 8
- Name of the header file to pass to the mail or news poster,
- containing all the information that the poster program needs in the
- form of a message header.
- It may also contain a copy of the current article.
- The format of the header file is controlled by the MAILHEADER and NEWSHEADER
- environment variables.
- X.Ip %H 8
- Host name (your machine's name).
- X.Ip %i 8
- X\*(L"Message-I.D.:\*(R" line from the current article, with <> guaranteed.
- X.Ip %I 8
- The reference indication mark (see the
- X.B \-F
- switch.)
- X.Ip %l 8
- The news administrator's login name, if any.
- X.Ip %L 8
- Login name (yours).
- X.Ip %m 8
- The current mode of
- X.I trn,
- for use in conditional macros.
- X.Sp
- X.nf
- X i Initializing.
- X n Newsgroup selection level.
- X t Thread selection level.
- X a Article selection level (What next?).
- X p Pager level (MORE prompt).
- X u Set unread? prompt.
- X A Add this newsgroup?
- X B aBandon confirmation.
- X C Catchup confirmation.
- X D Delete bogus newsgroups?
- X F Is followup a new topic?
- X M Use mailbox format?
- X R Resubscribe to this newsgroup?
- X.fi
- X.Sp
- Note that yes/no questions are all upper-case modes.
- If, for example, you wanted to disallow defaults on all yes/no questions,
- you could define the following macro:
- X.Sp
- X.nf
- X\e040 %(%m=[A-Z]?h: )
- X.fi
- X.Ip %M 8
- The number of articles marked to return via the \*(L'M\*(R' command.
- If the same article is Marked multiple times, \*(L"%M\*(R" counts it
- multiple times in the current implementation.
- X.Ip %n 8
- X\*(L"Newsgroups:\*(R" line from the current article.
- X.Ip %N 8
- XFull name (yours).
- X.Ip %o 8
- Organization (yours).
- X.Ip %O 8
- Original working directory (where you ran rn from).
- X.Ip %p 8
- Your private news directory, normally ~/News.
- X.Ip %P 8
- Public news spool directory, normally /usr/spool/news on systems that don't use NNTP.
- X.Ip %r 8
- Last reference on references line of current article (parent article id).
- X.Ip %R 8
- References list for a new article, constructed from the references and article
- ID of the current article.
- X.Ip %s 8
- Subject, with all Re's and (nf)'s stripped off.
- X.Ip %S 8
- Subject, with one \*(L"Re:\*(R" stripped off.
- X.Ip %t 8
- X\*(L"To:\*(R" line derived from the \*(L"From:\*(R" and \*(L"Reply-To:\*(R"
- lines of the current article.
- This always returns an Internet format address.
- X.Ip %T 8
- X\*(L"To:\*(R" line derived from the \*(L"Path:\*(R" line of the
- current article to produce a uucp path.
- X.Ip %u 8
- The number of unread articles in the current newsgroup.
- X.Ip %U 8
- The number of unread articles in the current newsgroup, not counting the
- the current article.
- When threads are selected, this count reflects only selected articles.
- X.Ip %v 8
- The number of unselected articles, not counting the current article
- if it is unselected.
- X.Ip %w 8
- The directory where mthreads keeps its tmp files.
- X.Ip %W 8
- The directory where thread files are placed.
- X.Ip %x 8
- The news library directory.
- X.Ip %X 8
- The rn library directory.
- X.Ip %z 8
- The length of the current article in bytes.
- X.Ip %Z 8
- The number of selected threads.
- X.Ip %~ 8
- Your home directory.
- X.Ip %. 8
- The directory containing your dot files, which is your home directory unless
- the environment variable DOTDIR is defined when rn is invoked.
- X.Ip %# 8
- The current count for a multi-file save, starting with 1.
- This value is incremented by one for each file saved or extracted within a
- single command.
- X.Ip %$ 8
- Current process number.
- X.Ip %/ 8
- Last search string.
- X.Ip %% 8
- A percent sign.
- X.Ip "%{name} or %{name\-default}" 8
- The environment variable \*(L"name\*(R".
- X.Ip %[name] 8
- The value of header line \*(L"Name:\*(R" from the current article.
- The \*(L"Name:\ \*(R" is not included.
- XFor example \*(L"%D\*(R" and \*(L"%[distribution]\*(R" are equivalent.
- The name must be spelled out in full.
- X.Ip %`command` 8
- Inserts the output of the command, with any embedded newlines translated
- to space.
- X.Ip %""prompt"" 8
- Prints prompt on the terminal, then inputs one string, and inserts it.
- X.Ip "%(test_text=pattern?then_text:else_text)" 8
- If
- X.I test_text
- matches
- X.IR pattern ,
- has the value
- X.IR then_text ,
- otherwise
- X.IR else_text .
- The \*(L":else_text\*(R" is optional, and if absent, interpolates the null string.
- The = may be replaced with != to negate the test.
- To quote any of the metacharacters
- X(\*(L'=\*(R', \*(L'?\*(R', \*(L':\*(R', or \*(L')\*(R'),
- precede with a backslash.
- X.Ip %digit 8
- The digits 1 through 9 interpolate the string matched by the nth bracket
- in the last pattern match that had brackets.
- If the last pattern had alternatives, you may not know the number of the
- bracket you want\*(--%0 will give you the last bracket matched.
- X.PP
- Modifiers: to capitalize the first letter, insert \*(L'^\*(R':
- X\*(L"%^C\*(R" produces something like \*(L"Net.jokes\*(R".
- Inserting \*(L'_\*(R' causes the first letter following the last
- X\&\*(L'/\*(R' to be capitalized: \*(L"%_c\*(R" produces \*(L"net/Jokes\*(R".
- X.PP
- Inserting \*(L'\\\*(R' will insert a backslash before
- any characters that would be magic in a regular expression:
- X\*L"%\\C\*(R" produces \*(L"net\\.jokes\*(R".
- This is called regexp quoting.
- X.SH ENVIRONMENT
- The following environment variables are paid attention to by
- X.IR trn .
- In general the default values assumed for these variables by
- X.I trn
- are reasonable, so if you are using
- X.I trn
- for the first time, you can safely ignore this section.
- Note that the defaults below may not correspond precisely to the defaults
- on your system.
- To find the actual defaults you would need to look in config.h and common.h
- in the trn source directory, and the file INIT in the trn library.
- X.PP
- Those variables marked (%) are subject to % interpolation, and those marked
- X(~) are subject to both % interpolation and ~ interpretation.
- X.Ip "ATTRIBUTION (%)" 8
- Gives the format of the attribution line in front of the quoted article
- included by an F command.
- X.Sp
- Default: In article %i %f writes:
- X.Ip "AUTOSUBSCRIBE" 8
- When
- X.I trn
- is checking for new newsgroups and finds one
- matching one of the patterns in AUTOSUBSCRIBE, the new group is
- automatically added to the end of the .newsrc, subscribed.
- Newsgroups not matching this or AUTOUNSUBSCRIBE, below, are offered
- to the user.
- X.Sp
- AUTOSUBSCRIBE is a comma separated list of newsgroup patterns ala
- X\*(L'o\*(R', \*(L'/\*(R', etc.
- It can also include \*(L"but not\*(R" entries preceded by \*(L'!\*(R'.
- X\*(L"a,b,!c,d\*(R" is read as \*(L"matching a or b, unless it also
- matches c; matching d regardless\*(R".
- Another way to look at it is \*(L"(((a or b) and not c) or d)\*(R".
- To automatically subscribe to all local
- groups but be choosy about non-local groups, one might say \*(L"*,!*.*\*(R".
- X.Sp
- Default: (none)
- X.Ip "AUTOUNSUBSCRIBE" 8
- AUTOUNSUBSCRIBE is very similar to AUTOSUBSCRIBE, above, but
- new newsgroups matching it are automatically added to the end
- of the .newsrc file, unsubscribed.
- If a newsgroup matches AUTOSUBSCRIBE, AUTOUNSUBSCRIBE is not consulted.
- X.Sp
- Default: (none)
- X.Ip "CANCEL (~)" 8
- The shell command used to cancel an article.
- X.Sp
- Default: inews \-h < %h
- X.Ip "CANCELHEADER (%)" 8 13v
- The format of the file to pass to the CANCEL command in order to cancel
- an article.
- X.Sp
- Default:
- X.br
- Newsgroups: %n
- X.br
- Subject: cmsg cancel %i
- X.br
- References: %R
- X.br
- Reply-To: %L@%H (%N)
- X.br
- Distribution: %D
- X.br
- Organization: %o
- X.sp 1
- X%i cancelled from rn.
- X.Ip DOTDIR 8
- Where to find your dot files, if they aren't in your home directory.
- Can be interpolated using \*(L"%.\*(R".
- X.Sp
- Default: $HOME
- X.Ip "EDITOR (~)" 8
- The name of your editor, if VISUAL is undefined.
- X.Sp
- Default: whatever your news administrator compiled in, usually vi.
- X.Ip "EXSAVER (%)" 8
- The shell command to execute in order to extract data to either /bin/sh
- or a user-specified command.
- X.Sp
- Default: tail +%Bc %A | %e
- X.Ip "EDITOR (~)" 8
- The name of your editor, if VISUAL is undefined.
- X.Sp
- Default: whatever your news administrator compiled in, usually vi.
- X.Ip "FIRSTLINE (%)" 8
- Controls the format of the line displayed at the top of an article.
- Warning: this may go away.
- X.Sp
- The default in an unthreaded group is approximately:
- X.Sp
- Article %a %(%U%M!=^00$?(%U more%(%M!=^0$? + %M Marked to return)\e) )in %C:
- X.Sp
- While the default in a threaded group is almost:
- X.Sp
- X%C #%a%(%Z=^0$?%(%U!=^0$? (%U more\e)): (%U + %v more\e))
- X.Ip HIDELINE 8
- If defined, contains a regular expression which matches article lines to
- be hidden, in order, for instance, to suppress quoted material.
- A recommended string for this purpose is \*(L"^>...\*(R", which \fIdoesn't\fR
- hide lines with only \*(L'>\*(R', to give some indication that quoted
- material is being skipped.
- If you want to hide more than one pattern, you can use \*(L"\||\|\*(R" to
- separate the alternatives.
- You can view the hidden lines by restarting the article with the \*(L'v\*(R'
- command.
- X.Sp
- There is some overhead involved in matching each line of the article against
- a regular expression.
- You might wish to use a baud-rate modifier to enable this feature only at
- low baud rates.
- X.Sp
- Default: undefined
- X.Ip HOME 8
- Your home directory.
- Affects ~ interpretation, and the location of your
- dot files if DOTDIR is not defined.
- X.Sp
- Default: $LOGDIR
- X.Ip "KILLGLOBAL (~)" 8
- Where to find the KILL file to apply to every newsgroup.
- See the \*(L'^K\*(R' command at the newsgroup selection level.
- X.Sp
- Default: %p/KILL
- X.Ip "KILLLOCAL (~)" 8
- Where to find the KILL file for the current newsgroup.
- See the commands \*(L'K\*(R' and \*(L'^K\*(R' at the article selection level,
- and the search modifier \*(L'K\*(R'.
- X.Sp
- Default: %p/%c/KILL
- X.Ip LOGDIR 8
- Your home directory if HOME is undefined.
- Affects ~ interpretation, and the location of your
- dot files if DOTDIR is not defined.
- X.Sp
- Default: none.
- X.Sp
- XExplanation: you must have either $HOME or $LOGDIR.
- X.Ip LOGNAME 8
- Your login name, if USER is undefined.
- May be interpolated using \*(L"%L\*(R".
- X.Sp
- Default: value of getlogin().
- X.Ip LOCALTIMEFMT 8
- The format used by strftime() to print the local time.
- The Date line is only displayed in local time if the group is threaded
- X(see the \-H option for more information on Date).
- X.Sp
- Default: %a %b %e %X %Z %Y
- X.Sp
- which is the same format as the
- X.IR date (1)
- command.
- X.Ip "MAILCALL (~)" 8
- What to say when there is new mail.
- X.Sp
- Default: (Mail)
- X.Ip "MAILFILE (~)" 8
- Where to check for mail.
- X.Sp
- Default: /usr/spool/mail/%L
- X.Ip "MAILHEADER (%)" 8
- The format of the header file for replies.
- See also MAILPOSTER.
- X.Sp
- Default:
- X.Sp
- To: %T
- X.br
- Subject: %(%i=^$?:Re: %S
- X.br
- Newsgroups: %n
- X.br
- In-Reply-To: %i)
- X.br
- X%(%[references]!=^$?References\\: %[references]
- X.br
- X)Organization: %o
- X.br
- Cc:
- X.br
- Bcc: \en\en
- X.Ip "MAILPOSTER (~)" 8
- The shell command to be used by the reply commands (r and R)
- in order to allow you to enter and deliver the response.
- X.I trn
- will not itself call upon an editor for replies\*(--this
- is a function of the program called by
- X.IR trn .
- See also MAILHEADER.
- X.Sp
- Default: Rnmail \-h %h
- X.Ip "MBOXSAVER (~)" 8
- The shell command to save an article in mailbox format.
- X.Sp
- Default: %X/mbox.saver %A %P %c %a %B %C "%b" \e
- X.br
- X"From: %T %`date`"
- X.Sp
- XExplanation: the first seven arguments are the same as for NORMSAVER.
- The eighth argument to the shell script is the new From: line
- for the article, including the posting date,
- derived either directly from the Posted: line, or not-so-directly from
- the Date: line.
- Header munging at its finest.
- X.Ip MODSTRING 8
- The string to insert in the group summary line, which heads each article,
- for a moderated group.
- See also NOPOSTRING.
- X.Sp
- Default: " (moderated)"
- X.Ip NAME 8
- Your full name.
- May be interpolated using \*(L"%N\*(R".
- X.Sp
- Default: name from /etc/passwd, or ~/.fullname.
- X.Ip "NEWSHEADER (%)" 8 16v
- The format of the header file for followups.
- See also NEWSPOSTER.
- X.Sp
- Default:
- X.Sp
- Newsgroups: %(%F=^$?%C:%F)
- X.br
- Subject: %(%S=^$?%"\en\enSubject: ":Re: %S)
- X.br
- Summary:
- X.br
- XExpires:
- X.br
- X%(%R=^$?:References: %R
- X.br
- X)Sender:
- X.br
- Reply-To: %L@%H (%N)
- X.br
- XFollowup-To:
- X.br
- Distribution: %(%i=^$?%"\enDistribution: ":%D)
- X.br
- Organization: %o
- X.br
- Keywords: \en\en
- X.Ip NEWSORG 8
- XEither the name of your organization, or the name of a file containing the
- name of your organization.
- X(For use at sites where the ORGANIZATION environmental variable is already
- in use.
- NEWSORG will override ORGANIZATION if both are present.)
- May be interpolated using \*(L"%o\*(R".
- X.Sp
- Default: whatever your news administrator compiled in.
- X.Ip "NEWSPOSTER (~)" 8
- The shell command to be used by the followup commands (f and F)
- in order to allow you to enter and post a followup news article.
- X.I trn
- will not itself call upon an editor for followups\*(--this
- is a function of the program called by
- X.IR trn .
- See also NEWSHEADER.
- X.Sp
- Default: Pnews \-h %h
- X.Ip NEWSRC 8
- Your newsgroup subscription list.
- X.Sp
- Default: $HOME/.newsrc
- X.Ip NNTPSERVER 8
- The hostname of your NNTPSERVER.
- X[This does not apply unless you are running the NNTP version of rn.]
- X.Sp
- Default: the hostname listed in the server file, usually
- X/usr/local/lib/rn/server.
- X.Ip NOPOSTRING 8
- The string to insert in the group summary line, which heads each article,
- for a group to which local posting is not allowed.
- See also MODSTRING.
- X.Sp
- Default: " (no posting)"
- X.Ip "NORMSAVER (~)" 8
- The shell command to save an article in the normal (non-mailbox) format.
- X.Sp
- Default: %X/norm.saver %A %P %c %a %B %C "%b"
- X.Ip ORGANIZATION 8
- XEither the name of your organization, or the name of a file containing the
- name of your organization.
- X(If NEWSORG is set, it will override ORGANIZATION.)
- May be interpolated using \*(L"%o\*(R".
- X.Sp
- Default: whatever your news administrator compiled in.
- X.Ip PAGESTOP 8
- If defined, contains a regular expression which matches article lines to
- be treated as form-feeds.
- There are at least two things you might want to do with this.
- To cause page breaks between articles in a digest, you might define it
- as \*(L"^--------\*(R".
- To force a page break before a signature, you could define it
- as \*(L"^-- $\*(R".
- X(Then, when you see \*(L"--\*(R" at the bottom of the page, you can skip
- the signature if you so desire by typing \*(L'n\*(R' instead of space.)
- To do both, you could use \*(L"^--\*(R".
- If you want to break on more than one pattern, you can use \*(L"\||\|\*(R" to
- separate the alternatives.
- X.Sp
- There is some overhead involved in matching each line of the article against
- a regular expression.
- You might wish to use a baud-rate modifier to enable this feature only at
- low baud rates.
- X.Sp
- Default: undefined
- X.Ip "PIPESAVER (%)" 8
- The shell command to execute in order to accomplish a save to a pipe
- X(\*(L"s\ |\ command\*(R" or \*(L"w\ |\ command\*(R").
- The command typed by the user is substituted in as %b.
- X.Sp
- Default: %(%B=^0$?<%A:tail +%Bc %A |) %b
- X.Sp
- XExplanation: if %B is 0, the command is \*(L"<%A %b\*(R", otherwise
- the command is \*(L"tail +%Bc %A | %b\*(R".
- X.Ip REPLYTO 8
- The value of the \*(L"Reply-To:\*(R" header, if needed.
- X.Sp Default: %L@%H (%N)
- X.Ip RNINIT 8
- Default values for switches may be passed to
- X.I trn
- by placing them in either RNINIT or TRNINIT.
- RNINIT is used when in rn-compatibility mode or if TRNINIT isn't found.
- Any switch that is set in this way may be overruled
- on the command line, or via the \*(L'&\*(R' command from within
- X.IR trn .
- Binary-valued switches that are set with \*(L"\-switch\*(R" may be unset
- using \*(L"+switch\*(R".
- X.Sp
- If RNINIT begins with a \*(L'/\*(R' it is assumed to be the name of a file
- containing switches.
- If you want to set many environment variables but don't want to keep
- them all in your environment, or if the use of any of these variables
- conflicts with other programs, you can use this feature along with the
- X.B \-E
- switch to set the environment variables upon startup.
- X.Sp
- Default: \*(L" \*(R".
- X.Ip "RNMACRO (~)" 8
- The name of the file containing macros and key mappings.
- See the MACROS section.
- X.Sp
- Default: %./.rnmac
- X.Ip "SAVEDIR (~)" 8
- The name of the directory to save to, if the save command does not specify
- a directory name.
- X.Sp
- Default:
- X.br
- X If
- X.B \-/
- is set: %p/%c
- X.br
- X If
- X.B +/
- is set: %p
- X.Ip "SAVENAME (%)" 8
- The name of the file to save to, if the save command contains only a
- directory name.
- X.Sp
- Default:
- X.br
- X If
- X.B \-/
- is set: %a
- X.br
- X If
- X.B +/
- is set: %^C
- X.Ip "SELECTCHARS" 8
- The characters used by the thread selector to select the associated thread
- of discussion.
- You can specify up to 64 visible characters, including upper- and lower-case
- letters, numbers, and many punctuation characters.
- Selection characters override command characters in the selector, but are
- not excluded from macro expansion, so be careful.
- X.br
- Default: abcdefgijlorstuvwxz1234567890
- X.br
- X(h, k, n, p, q, and y are omitted to allow them to be typed as commands).
- X.Ip SHELL 8
- The name of your preferred shell.
- It will be used by the \*(L'!\*(R', \*(L'S\*(R' and \*(L'W\*(R' commands.
- X.Sp
- Default: whatever your news administrator compiled in.
- X.Ip "SUBJLINE (%)" 8
- Controls the format of the lines displayed by the \*(L'=\*(R' command at
- the article selection level.
- X.Sp
- Default: %s
- X.Ip "SUPERSEDEHEADER (%)" 8 16v
- The format of the header file for a supersede article.
- X.Sp
- Default:
- X.Sp
- XFrom: %L@%H (%N)
- X.br
- Newsgroups: %n
- X.br
- Subject: %S
- X.br
- Distribution: %D
- X.br
- Organization: %o
- X.br
- Supersedes: %i
- X.Ip TERM 8
- Determines which termcap entry to use, unless TERMCAP contains the entry.
- X.Ip TERMCAP 8
- Holds either the name of your termcap file, or a termcap entry.
- X.Sp
- Default: /etc/termcap, normally.
- X.Ip TRNINIT 8
- Trn's version of the RNINIT environment variable.
- See RNINIT for a description.
- X.Ip "UNSHAR (~)" 8
- The shell command to execute in order to accomplish the unshar'ing of a
- shell archive.
- X.Sp
- Default: /bin/sh
- X.Ip USER 8
- Your login name.
- May be interpolated using \*(L"%L\*(R".
- X.Sp
- Default: $LOGNAME
- X.Ip "VISUAL (~)" 8
- The name of your editor.
- X.Sp
- Default: $EDITOR
- X.Ip "YOUSAID (%)" 8
- Gives the format of the attribution line in front of the quoted article
- included by an R command.
- X.Sp
- Default: In article %i you write:
- X.SH MACROS
- When
- X.I trn
- starts up, it looks for a file containing macro definitions (see environment
- variable RNMACRO).
- Any sequence of commands may be bound to any sequence of keys, so you
- could remap your entire keyboard if you desire.
- Blank lines or lines beginning with # in the macro file are considered
- comments; otherwise
- X.I trn
- looks for two fields separated by white space.
- The first field gives the sequence of keystrokes that trigger the macro,
- and the second field gives the sequence of commands to execute.
- Both fields are subject to % interpolation, which will also translate
- backslash and uparrow sequences.
- X(The keystroke field is interpreted at startup time, but the command field
- is interpreted at macro execution time so that you may refer to % values
- in a macro.)
- XFor example, if you want to reverse the roles of carriage return and
- space in
- X.I trn
- X.Sp
- X^J \e040
- X.br
- X^M \e040
- X.br
- X\e040 ^J
- X.Sp
- will do just that.
- By default, all characters in the command field are interpreted as the
- canonical
- X.I trn
- characters, i.e. no macro expansion is done.
- Otherwise the above pair of macros would cause an infinite loop.
- To force macro expansion in the command field, enclose the
- macro call with ^( ... ^) thusly:
- X.Sp
- X@s |mysavescript
- X.br
- X@w w^(@s^)
- X.Sp
- You can use the %() conditional construct to construct macros that work
- differently under different circumstances.
- In particular, the current mode (%m) of
- X.I trn
- could be used to make a command that only works at a particular level.
- This is particularly vital for the thread selector, which uses most of
- the lower-case letters to select the associated thread of discussion.
- XFor example,
- X.Sp
- a %(%m=t?a:s art.hold\en)
- X.Sp
- will return the original letter (a) in the thread selector, and the command
- X\*(L"s art.hold\en\*(R" everywhere else.
- X.Sp
- X%(%{TERM}=vt100?^[[O) /^J
- X.Sp
- will do the binding only if the terminal type is vt100,
- though if you have many of these it would be better to have separate
- files for each terminal.
- X.Sp
- If you want to bind a macro to a function key that puts a common garbage character
- after the sequence (such as the carriage return on the end of Televideo 920
- function sequences), DO NOT put the carriage return
- into all the sequences or you will waste a CONSIDERABLE amount of internal
- storage.
- Instead of \*(L"^AF^M\*(R", put \*(L"^AF+1\*(R", which indicates to
- X.I trn
- that it should gobble up one character after the F.
- X.SH "WHAT'S NEW?"
- Here's a quick run-down of
- X.IR trn 's
- new features and commands aimed at the knowledgeable
- X.I rn
- user.
- X.Sp
- One of the biggest improvements is the Thread Selector, which is bound
- to the \*(L'+\*(R' key.
- The selector displays a list of subject threads and (by default) authors
- to allow you to select the topics that interest you by typing their
- associated letter.
- The thread selector can also be used to browse articles that have already
- been read, to selectively re-read discussions (use the \*(L'U\*(R' command).
- X.Sp
- Another big improvement is the thread-ordered display of articles.
- While reading each topic,
- X.I trn
- displays each article and its replies in the order of their parent/child
- relationship.
- This lets you follow the flow of the discussion better, instead of jumping
- around from idea to idea or even reading a reply before the original article.
- X.Sp
- Along this same line is the addition of the article-tree display in the
- upper-right corner of the header.
- Glancing at the tree gives you a better feel for how the articles you are
- reading relate to each other.
- X.Sp
- The header has also been modified to hide a few more header-lines by default
- X(e.g. References), but, as always, you can override these with \-h.
- There is also some new \*(L"magic\*(R" in the header: the From header is
- trimmed to be just the comment portion (if available), and the Date header
- is displayed in local time (in threaded groups).
- Override these defaults with +H.
- X.Sp
- Once you begin reading articles, use the regular movement commands (n, N,
- p, P, etc.) as you normally would.
- Then, check out the [, ], {, and } commands to move around in the article
- tree a bit more directly.
- XFor example, the \*(L'[\*(R' command takes you to your parent article,
- even if it was already read, which is very useful for tracking down the
- cited portion of the article in its original context.
- X.Sp
- There are additional kill commands for the entire thread (J) and the
- current article and all its replies (,).
- The KILL files have been extended to allow killing by thread (T), which will
- kill a topic even if people fine-tune the subject along the way.
- X.Sp
- There is also an easy way to skip around among the various threads with
- the < and > commands.
- X.Sp
- Note: your news administrator has the option of turning thread processing
- off for individual groups, and thus it is possible for some groups to not
- have any pre-processed thread information available for use.
- When
- X.I trn
- encounters such a group, it generates the thread information on the fly
- while entering the group.
- XFor really large groups (or really slow systems), this can take an
- appreciable amount of time.
- If you can't talk your news administrator into pre-threading the group,
- you can turn off the thread database on a group-by-group basis using
- the \*(L't\*(R' command at the newsgroup selection level.
- Groups turned off in this way are read in the traditional
- X.I rn
- fashion\*(--articles arranged in arrival order with optional subject
- searching and no thread selector.
- X.Sp
- There is a new command, \*(L"e dir\*(R", that extracts a shell archive or
- uuencoded file into the specified directory.
- It is even possible to extract other data formats if you specify the
- appropriate filter command (e.g. \*(L"e dir|cmd\*(R".
- X.Sp
- Also, if you plan to use macro definitions, it is good to keep in mind
- that the thread selector uses most of the lower-case letters for thread
- selection, and thus it is a good idea to explicitly set the mode(s) in
- which a macro applies.
- XFor example, if you want to press 'f' from the article pager/selector to
- forward the current article to the user \*(L"smith\*(R", you could define:
- X.Sp
- X.nf
- X f %(%m=[pa]?|mail smith\en:f)
- X.fi
- X.Sp
- This checks the current mode (%m) and if it is \*(L'p\*(R' or \*(L'a\*(R'
- it expands it to the string \*(L"|mail smith\en\*(R", otherwise it returns
- the letter \*(L'f\*(R'.
- In some cases, you may simply wish to exclude the thread selector from a
- macro with the conditional \*(L"%m!=t\*(R".
- X.Sp
- XFinally, you'll probably want to use the new options,
- X.B \-x
- and
- X.B \-X
- to ensure that all the newest features are available for use.
- These options might be on by default, depending on how your administrator
- decided to install
- X.IR trn .
- X.SH AUTHORS
- Rn was created by Larry Wall <lwall@jpl-devvax.jpl.nasa.gov>
- X.br
- and is now under the direction of Stan Barber <sob@bcm.tmc.edu>.
- X.br
- Threaded version by Wayne Davison <davison@borland.com>
- X.br
- X(Mail all bug reports for trn to Wayne.)
- X.br
- Regular expression routines are borrowed from emacs, by James Gosling.
- X.SH FILES
- X.Ip "%./.newsrc" 1.25i
- status of your news reading
- X.Ip "%./.oldnewsrc" 1.25i
- backup copy of your
- X.I .newsrc
- from start of session
- X.Ip "%./.rnlock" 1.25i
- lock file so you don't screw up your
- X.I .newsrc
- X.Ip "%./.rnlast" 1.25i
- info from last run of rn
- X.Ip "%./.rnsoft" 1.25i
- soft pointers into /usr/lib/news/active to speed startup, synchronous with
- X.I .newsrc
- X.Ip "%./.rnhead" 1.25i
- temporary header file to pass to a mailer or news poster
- X.Ip "%./.rnmac" 1.25i
- macro and keymap definitions
- X.Ip "%p" 1.25i
- your news save directory, usually ~/News
- X.Ip "%x/active" 1.25i
- the list of active newsgroups, usually /usr/lib/news/active on systems that don't use NNTP
- X.Ip "%P" 1.25i
- the public news spool directory, usually /usr/spool/news on systems that don't use NNTP
- X.Ip "%X/INIT" 1.25i
- system-wide default switches
- X.SH SEE ALSO
- newsrc(5), more(1), readnews(1), Pnews(1), Rnmail(1)
- X.SH DIAGNOSTICS
- Generally self-documenting, as they say.
- X.SH BUGS
- The
- X.B \-h
- switch can only hide header lines that
- X.I trn
- knows about.
- X.PP
- The \*(L'\-\*(R' command doesn't cross newsgroup boundaries, and only undoes
- the last article selection.
- X.PP
- If you edit your
- X.I .newsrc
- while
- X.I trn
- is running,
- X.I trn
- will happily wipe out your changes when it decides to
- write out the
- X.I .newsrc
- file.
- X.PP
- Marking of duplicate articles as read in cross-referenced newsgroups will
- not work unless the Xref patch is installed in inews.
- X.PP
- If you get carried away with % or escape substitutions, you can overflow
- buffers.
- X.PP
- There should be no fixed limit on the number of newsgroups.
- X.PP
- Some of the more esoteric features may be missing on machines with limited
- address space.
- END_OF_FILE
- if test 83112 -ne `wc -c <'trn.1'`; then
- echo shar: \"'trn.1'\" unpacked with wrong size!
- fi
- # end of 'trn.1'
- fi
- echo shar: End of archive 13 \(of 13\).
- cp /dev/null ark13isdone
- MISSING=""
- for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 13 archives.
- rm -f ark[1-9]isdone ark[1-9][0-9]isdone
- else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
- fi
- ## End of shell archive.
- exit 0
-